<template>
	<svg :width="width" :height="height" :fill="color" aria-hidden="true">
		<use :xlink:href="symbolId" />
	</svg>
</template>

<script setup>
import { computed } from 'vue';

// 接收父组件参数并设置默认值
const props = withDefaults(defineProps(), {
	prefix: "icon",
	width: 25,
	height: 25,
	color: "#666666"
});

const symbolId = computed(() => `#${props.prefix}-${props.name}`);
</script>
